/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bookshop.controllers;

import com.bookshop.entity.*;
import com.bookshop.facade.AuthorFacade;
import com.bookshop.facade.BookFacade;
import com.bookshop.facade.CategoryFacade;
import com.bookshop.facade.CollectionFacade;
import com.bookshop.facade.PublisherFacade;
import com.bookshop.facade.SerieFacade;
import com.bookshop.facade.TypeFacade;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author Thibault
 */
@ManagedBean(name = "searchController")
@SessionScoped
public class SearchController implements Serializable{
    @EJB
    private TypeFacade typeFacade;
    private List<Type> types = new ArrayList<Type>();
    private Type type = new Type();
    
    @EJB
    private SerieFacade serieFacade;
    private List<Serie> series = new ArrayList<Serie>();
    private Serie serie = new Serie();
    
    @EJB
    private PublisherFacade publisherFacade;
    private List<Publisher> publishers = new ArrayList<Publisher>();
    private Publisher publisher = new Publisher();
    
    @EJB
    private CollectionFacade collectionFacade;
    private List<Collection> collections = new ArrayList<Collection>();
    private Collection collection = new Collection();
    
    @EJB
    private AuthorFacade authorFacade;
    private List<Author> authors = new ArrayList<Author>();
    private Author author = new Author();
    
    @EJB
    private CategoryFacade categoryFacade;
    private List<Category> categories = new ArrayList<Category>();
    private Category category = new Category();
    
    @EJB
    private BookFacade bookFacade;
    private List<Book> books = new ArrayList<Book>();
    private Book book = new Book();

    public TypeFacade getTypeFacade() {
        return typeFacade;
    }

    public List<Type> getTypes() {
        return types;
    }

    public Type getType() {
        return type;
    }

    public SerieFacade getSerieFacade() {
        return serieFacade;
    }

    public List<Serie> getSeries() {
        return series;
    }

    public Serie getSerie() {
        return serie;
    }

    public PublisherFacade getPublisherFacade() {
        return publisherFacade;
    }

    public List<Publisher> getPublishers() {
        return publishers;
    }

    public Publisher getPublisher() {
        return publisher;
    }

    public CollectionFacade getCollectionFacade() {
        return collectionFacade;
    }

    public List<Collection> getCollections() {
        return collections;
    }

    public Collection getCollection() {
        return collection;
    }

    public AuthorFacade getAuthorFacade() {
        return authorFacade;
    }

    public List<Author> getAuthors() {
        return authors;
    }

    public Author getAuthor() {
        return author;
    }

    public CategoryFacade getCategoryFacade() {
        return categoryFacade;
    }

    public List<Category> getCategories() {
        return categories;
    }

    public Category getCategory() {
        return category;
    }

    public BookFacade getBookFacade() {
        return bookFacade;
    }

    public List<Book> getBooks() {
        return books;
    }

    public Book getBook() {
        return book;
    }

    public void setTypeFacade(TypeFacade typeFacade) {
        this.typeFacade = typeFacade;
    }

    public void setTypes(List<Type> types) {
        this.types = types;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public void setSerieFacade(SerieFacade serieFacade) {
        this.serieFacade = serieFacade;
    }

    public void setSeries(List<Serie> series) {
        this.series = series;
    }

    public void setSerie(Serie serie) {
        this.serie = serie;
    }

    public void setPublisherFacade(PublisherFacade publisherFacade) {
        this.publisherFacade = publisherFacade;
    }

    public void setPublishers(List<Publisher> publishers) {
        this.publishers = publishers;
    }

    public void setPublisher(Publisher publisher) {
        this.publisher = publisher;
    }

    public void setCollectionFacade(CollectionFacade collectionFacade) {
        this.collectionFacade = collectionFacade;
    }

    public void setCollections(List<Collection> collections) {
        this.collections = collections;
    }

    public void setCollection(Collection collection) {
        this.collection = collection;
    }

    public void setAuthorFacade(AuthorFacade authorFacade) {
        this.authorFacade = authorFacade;
    }

    public void setAuthors(List<Author> authors) {
        this.authors = authors;
    }

    public void setAuthor(Author author) {
        this.author = author;
    }

    public void setCategoryFacade(CategoryFacade categoryFacade) {
        this.categoryFacade = categoryFacade;
    }

    public void setCategories(List<Category> categories) {
        this.categories = categories;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public void setBookFacade(BookFacade bookFacade) {
        this.bookFacade = bookFacade;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }

    public void setBook(Book book) {
        this.book = book;
    }

    /**
     * Creates a new instance of SearchController
     */
    public SearchController() {
        //this.authors = authorFacade.findAll();
    }
    
    
    
}
